/*
 * Copyright (C) 2011 Dirk Weißenborn, dirk.weissenborn@gmail.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.weissenborn.colabtex.client.view;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.Label;

/**
 * The Class DashboardViewImpl.
 */
public class DashboardViewImpl extends Composite implements DashboardView {

	/**
	 * The Interface Binder.
	 */
	interface Binder extends UiBinder<Widget, DashboardViewImpl> {
	}
	
	/** The Constant binder. */
	private static final Binder binder = GWT.create(Binder.class);
	
	/** The Greetings label. */
	@UiField Label GreetingsLabel;

	/** The listener. */
	private Presenter listener;

	/**
	 * Instantiates a new dashboard view impl.
	 */
	public DashboardViewImpl() {
		initWidget(binder.createAndBindUi(this));
	}

	/* (non-Javadoc)
	 * @see com.weissenborn.colabtex.client.view.DashboardView#setPresenter(com.weissenborn.colabtex.client.view.DashboardView.Presenter)
	 */
	public void setPresenter(Presenter listener) {
		this.listener = listener;
	}
	
	/* (non-Javadoc)
	 * @see com.weissenborn.colabtex.client.view.DashboardView#setText(java.lang.String)
	 */
	public void setText(String text) {
		GreetingsLabel.setText(text);
	}
}
